/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

import Database.IFDBApartment;
import Database.DBApartment;
import Domain.Apartment;
import java.util.ArrayList;

/**
 *
 * @author Min0
 */
public class CTRLApartment {
    
    private IFDBApartment Apartment = new DBApartment();
    
    public CTRLApartment()
    {
    }
    
    public void insertApartment(Apartment apartment)
    {
        Apartment.InsertApartment(apartment);
    }
    
    public void insertApartment(int ApartmentNo, String Description, String Available, float Price)
    {
        Apartment.InsertApartment(ApartmentNo, Description, Available, Price);
    }
    
    public Apartment GetApartment(int appartmentNo)
    {
        return Apartment.GetApartment(appartmentNo);
    }
    
    public ArrayList<Apartment> GetApartmentList()
    {
        return Apartment.GetApartmentList();
    }
    
    public void UpdateApartment(int ApartmentNo, String Description, String Available, float Price)
    {
        Apartment.UpdateApartment(ApartmentNo, Description, Available, Price);
    }
    
    public void UpdateApartmentDescription(int ApartmentNo, String Description)
    {
        Apartment.UpdateApartmentDescription(ApartmentNo, Description);
    }
    
    public void UpdateApartmentStatus(int ApartmentNo,String Available)
    {
        Apartment.UpdateApartmentStatus(ApartmentNo, Available);
    }
    
    public void UpdateApartmentPrice(int ApartmentNo, float Price)
    {
        Apartment.UpdateApartmentPrice(ApartmentNo, Price);
    }
    
    public void DeleteApartment(int apartmentNo)
    {
        Apartment.DeleteApartment(apartmentNo);
    }
    
    public int getMax()
    {
        return Apartment.getMax();
    }
}
